package org.lyq.erp.utils.string;

import java.util.List;

public class ObjectEmptyUtils {
	public static boolean isNotEmptyString(String str) {
		return (str != null && str.trim().length() > 0);
	}

	public static boolean isEmptyString(String str) {
		return !(str != null && str.trim().length() > 0);
	}

	public static boolean isNumeric(String str) {
		return (isNotEmptyString(str) && str.matches("^[0-9]*$"));
	}

	public static boolean isEmptyList(List<?> temp) {
		return (temp == null || temp.size() == 0);
	}

	public static boolean isNotEmptyList(List<Object> temp) {
		return !(temp == null || temp.size() == 0);
	}

	public static boolean isNotEmpty(Object obj) {
		return (obj != null);
	}

	public static boolean isEmptyArray(Object[] obj) {
		return (obj == null || obj.length == 0);
	}
}
